﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="display_visitor.aspx.cs" Inherits="display_visitor" %>
<%@ Register assembly="AspNetPager" namespace="Wuqi.Webdiyer" tagprefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>无标题页</title>
    <script src="../script1/jquery-1.3.2.js" type="text/javascript"></script>
    <script src="../js/display_vistors.js" type="text/javascript" charset="gb2312"></script>
     <link href="../style.css" rel="stylesheet" type="text/css" />
</head>
<body onload=" parent.document.getElementById('main').height = document.body.scrollHeight > 620 ?document.body.scrollHeight+10:620;">
    <form id="form1" runat="server">  
 <div class="header_back" style="width:818px;height:35px;padding-left:5px;padding-top:5px;">
     <table style="width: 100%;" class="font33" border="0px" cellpadding="0" cellspacing="0">
          <tr>
            <td>
            <div id="ddlVisible" style="display:inline" runat="server">机构：<asp:DropDownList ID="DropDownList2" runat="server" AutoPostBack="True" DataSourceID="SqlDataSource3"
                                DataTextField="jigou" DataValueField="jigou" Width="254px" OnSelectedIndexChanged="DropDownList2_SelectedIndexChanged" AppendDataBoundItems=true>
                                <asp:ListItem Text="请选择" Value=""></asp:ListItem>
                            </asp:DropDownList></div>
                用户名:
                <asp:TextBox ID="txtUser" runat="server" ToolTip="需要查找的用户名" Width="100px" />&nbsp;&nbsp;<asp:Button
                    ID="btnSearch" runat="server" Text="查  找" OnClick="btnSearch_Click" />
            </td>
        </tr>
     
     </table>
 </div>
    <table style="width: 872px" class="font33">
      
        <tr>
            <td  class="table_con">
                <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False"  PageSize="15" Width="820px"
                    DataKeyNames="id" OnRowDataBound="GridView2_RowDataBound"                 
                    BorderStyle="None" CellPadding="0" ForeColor="Black" GridLines="Vertical"
                    CssClass="font33" >
                    <Columns>
                        <%--<asp:BoundField HeaderText="自动编号" >
                        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                        </asp:BoundField>--%>
                        <asp:TemplateField HeaderText="选择">
                            <ItemTemplate>
                                <asp:CheckBox ID="CheckBox1" runat="server" />
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="role" HeaderText="访问者身份" SortExpression="role" />
                        <asp:BoundField DataField="username" HeaderText="用户名" SortExpression="username" />
                        <asp:BoundField DataField="username1" HeaderText="用户姓名" SortExpression="username1" />
                        <asp:BoundField DataField="jigou" HeaderText="所属机构" SortExpression="jigou" />
                        <asp:BoundField DataField="xtsj" HeaderText="操作时间" SortExpression="xtsj" />
                        <asp:BoundField DataField="detail" HeaderText="操作" SortExpression="detail" />
                        <asp:BoundField DataField="user_ip" HeaderText="IP" SortExpression="user_ip" Visible="false"/>
                    </Columns>
               
                    <HeaderStyle BackColor="#D9EDB2" Font-Bold="True" ForeColor="Black" Font-Underline="False" />
                </asp:GridView>
            </td>
        </tr>
        <tr>
            <td >
                <table>
                    <tr>
                        <td align=left>
                            <input type="checkbox" id="checkTest"  onclick="javascript:if(this.checked){$('input:checkbox').attr('checked','true');}else{$('input:checkbox').attr('checked','');}" />全选/取消全选
                        </td>
                        <td >
                            &nbsp;&nbsp;
                            <asp:Button ID="Button3" runat="server" Font-Size="9pt" OnClick="Button3_Click" Text="删除"
                                OnClientClick="return confirm('确认删除所选数据?');" />
                        </td>
                        <td class="webdeyer" style="padding-left:10px;">  <webdiyer:AspNetPager ID="Pager" runat="server" CurrentPageButtonClass="" FirstPageText="首页"
                        LastPageText="尾页" NextPageText="下一页" PageSize="18" PrevPageText="上一页" LayoutType="Div"
                        InvalidPageIndexErrorMessage="抱歉,页码超出范围" CustomInfoHTML="页次:%CurrentPageIndex%/%PageCount% 共%RecordCount%条"
                        PageIndexOutOfRangeErrorMessage="抱歉,页码超出范围" ShowCustomInfoSection="Left" ShowPageIndexBox="Always"
                        TextAfterPageIndexBox="页" TextBeforePageIndexBox="转到第" AlwaysShow="true" HorizontalAlign="Right"
                        Direction="LeftToRight" CustomInfoTextAlign="Right" ShowPageIndex="False" OnPageChanging="pager_PageChanging"
                        ShowMoreButtons="False" Width="650px" ShowNavigationToolTip="True" CustomInfoClass="PagerClassCss"
                        SubmitButtonClass="page_go" PageIndexBoxClass="txt_class" CssClass="page_a">
                    </webdiyer:AspNetPager></td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td style="width: 100px">
            </td>
        </tr>
        <tr>
            <td style="width: 100px">
             <%--   <asp:SqlDataSource ID="SDSvisitor" runat="server" ConnectionString="<%$ ConnectionStrings:gConnectionString %>"
                    SelectCommand="SELECT * FROM [details] where jigou=@jigou  order by [xtsj] desc">
                    <SelectParameters>
                    <asp:ControlParameter ControlID="DropDownList2" Name="jigou" PropertyName="selectedValue" />
                    </SelectParameters>
                    </asp:SqlDataSource>--%>
                                    <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:gConnectionString %>"
                    SelectCommand="SELECT DISTINCT [jigou] FROM [account] WHERE (([role] = @role1) OR ([role] = @role2))">
                    <SelectParameters>
                        <asp:Parameter DefaultValue="机构" Name="role1" Type="String" />
                        <asp:Parameter DefaultValue="管理员" Name="role2" Type="String" />
                    </SelectParameters>
                </asp:SqlDataSource>
            </td>
        </tr>
    </table>
</form>
</body>
</html>
